﻿@model Zosnn.Models.Product

@{
    ViewBag.Title = "新建商品";
}




@using (Html.BeginForm()) 
{
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal">
        <h4>Product</h4>
        <hr />
        @Html.ValidationSummary(true)

        <div class="form-group">
            @Html.LabelFor(model => model.Name, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Name)
                @Html.ValidationMessageFor(model => model.Name)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.TypeID, "TypeID", new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("TypeID", String.Empty)
                @Html.ValidationMessageFor(model => model.TypeID)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Price, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Price)
                @Html.ValidationMessageFor(model => model.Price)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.SellerID, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.SellerID)
                @Html.ValidationMessageFor(model => model.SellerID)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.SmallPic, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.SmallPic)
                @Html.ValidationMessageFor(model => model.SmallPic)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Staus, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Staus)
                @Html.ValidationMessageFor(model => model.Staus)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Spec, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Spec)
                @Html.ValidationMessageFor(model => model.Spec)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Created, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Created)
                @Html.ValidationMessageFor(model => model.Created)
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Create" class="btn btn-default" />
            </div>
        </div>
    </div>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
